<?php
 require('../../public/header.php'); 
    require('../../public/function.php');
    $arr=select('blog','blog');$array=select('blog','fenlei');
$lei=$_POST['search-sort'];
$r=$_POST['keywords'];
 connection('blog');
if(!empty($lei)){$oow="select * from blog where fid='$lei' and content like '%$r%'";}else{$oow="select * from blog  where content like '%$r%'";}
$rrr=mysql_query($oow);
$ttt=array();
while($t=mysql_fetch_assoc($rrr)){
$ttt[]=$t;
}
?>
    <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="/jscss/admin">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">作品管理</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="/admin/articlelist/select.php" method="post">
                    <table class="search-tab">
                         <tr>
                            <th width="120">选择分类:</th>
                            <td><select name='search-sort' id=''>
                                <option value=''>全部</option>
                            <?php   foreach($array as $ke=>$va){echo "
                                    <option value=".$va['id'].">".$va['l']."</option>";}  ?></select>
                            </td>
                            <th width="70">关键字:</th>
                            <td><input class="common-text" placeholder="关键字" name="keywords" value="" id="" type="text"></td>
                            <td>
                            <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="/admin/insert/insert.php"><i class="icon-font"></i>新增作品</a>
                        <a id="batchDel" href="javascript:void(0)"><i class="icon-font"></i>批量删除</a>
                        <a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th class="tc" width="5%"><input class="allChoose" name="" type="checkbox"></th>
                            <th>排序</th>
                            <th>ID</th>
                            <th>标题</th>
                            <th>审核状态</th>
                            <th>点击</th>
                            <th>发布人</th>
                            <th>更新时间</th>
                            <th>评论</th>
                            <th>操作</th>
                        </tr>
                        <?php

                        foreach($ttt as $k=>$v){
                            echo '<tr>
                            <td class="tc"><input name="id[]" value="58" type="checkbox"></td>
                            <td>
                                <input name="ids[]" value="58" type="hidden">
                                <input class="common-input sort-input" name="ord[]" value="0" type="text">
                            </td>
                            <td>'.$v['id'].'</td>
                            <td ><a target="_blank" href="#" >'.$v['title'].'</a> …
                            </td>
                            <td>0</td>
                            <td>35</td>
                            <td>'.$v['author'].'</td>
                            <td>'.$v['ctime'].'</td>
                            <td></td>
                            <td>
                                <a class="link-update" href="alter.php?id='.$v['id'].'">修改</a>
                                <a class="link-del" href="del.php?id='.$v['id'].'">删除</a>
                            </td>';
                            

                        }
                            ?>
                        </tr>
                    </table>
                    <div class="list-page"><?php echo count($ttt); ?>条</div>
                </div>
            </form>
        </div>
    </div>
    <!--/main-->
<?php require('../../public/footer.php'); ?>





















